<template>
  <div class="">
    <span>账号：</span><input type="text" v-model="id" placeholder="请输入账号">
    <span>密码：</span><input type="text" v-model="password" placeholder="请输入密码">
    <b></b>
    <button @click="check">登录</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      id :'',
      password :''
    }
  },
  methods : {
     check(){
      if(this.id == 'admin' && this.password == '123456')
      alert("登录成功");
      else
      {
        alert("登录失败");
      }
     }
  }
}
</script>

<style scoped lang="scss">
</style>